package com.jc.vm;

import java.util.ArrayList;
import java.util.List;
/**
 * vm args: -verbos:gc -Xms20M -Xmn10M -XX:+PrintGCDetails -XX:SurvivorRatio=8
 * @author jevoncode
 *
 */
public class HeapOutOfMemoryDemo {
	static class DataObject {

	}

	public static void main(String[] args) throws InterruptedException {
		List<DataObject> list = new ArrayList<>();

		Thread.sleep(10000);
		while (true) {
			list.add(new DataObject());
		}
	}
}
